<?php /* Smarty version 2.6.26, created on 2018-07-25 23:45:45
         compiled from D:%5Citemstudy%5Citem/member%5Ctemplates/shop/base.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'import', 'D:\\itemstudy\\item/member\\templates/shop/base.html', 1, false),array('modifier', 'img_size', 'D:\\itemstudy\\item/member\\templates/shop/base.html', 71, false),)), $this); ?>
<?php echo $this->_plugins['function']['import'][0][0]->import(array('file' => "index/header_shop.html",'title' => "基础信息"), $this);?>
 
<style type="text/css">
.base_lft{ width:700px; float:left; } 
.base_rit{ width:220px; float:left; }

.sp_logo{ width:120px; background:#f8f8f8; border:1px solid #eee; margin:10px 0 0 0; float:left;}
.sp_logo span{width:120px; height:120px; line-height:120px; text-align:center; float: left;} 
.sp_logo span img{ max-height:120px; max-width:120px; }
.uploadfile{ width:100%; padding:3px 0; height:20px; line-height:20px; position:relative; cursor:pointer; color:#666; background:#efefef; text-align:center; overflow: hidden; display: inline-block; *display: inline; *zoom: 1; float:left; } 
.uploadfile input{position:absolute; font-size:100px; right:0; top:0; opacity:0; filter:alpha(opacity=0); cursor:pointer; } 
.uploadfile:hover {color: #444; background:#eee; border-color:#ccc; text-decoration:none; }
</style> 
<div class="tab_name"><span>店铺信息</span></div>
<div class="baseBox">
	<div class="base_lft">
	<form action="?m=shop&a=base_save" method="post" id="form" back="false"> 
		<table class="etable">
			<tr>
				<td width="100">店铺名称： </td>
				<td><input type="text" name="name" size="38" id="text" value="<?php echo $this->_tpl_vars['row']['name']; ?>
"/></td>
			</tr>
			<tr>
				<td>主营业务： </td>
				<td><input type="text" name="main_seller" size="38" id="text" value="<?php echo $this->_tpl_vars['row']['main_seller']; ?>
"/></td>
			</tr>
			<tr>
				<td>店铺介绍： </td>
				<td><textarea name="intro" cols="40" rows="3"><?php echo $this->_tpl_vars['row']['intro']; ?>
</textarea></td>
			</tr>
			<tr>
				<td>联系人： </td>
				<td><input type="text" name="contact" size="38" id="contact" value="<?php echo $this->_tpl_vars['row']['contact']; ?>
"/></td>
			</tr> 
			<tr>
				<td>电话： </td>
				<td><input type="text" name="mobile" size="38" id="mobile" value="<?php echo $this->_tpl_vars['row']['mobile']; ?>
"/></td>
			</tr>
			<tr>
				<td>邮箱： </td>
				<td><input type="text" name="email" size="38" value="<?php echo $this->_tpl_vars['row']['email']; ?>
"/></td>
			</tr>
			<tr>
				<td>QQ号： </td>
				<td><input type="text" name="qq" size="38" value="<?php echo $this->_tpl_vars['row']['qq']; ?>
"/></td>
			</tr>
			<tr>
				<td>旺旺号： </td>
				<td><input type="text" name="ww" size="38" value="<?php echo $this->_tpl_vars['row']['ww']; ?>
"/></td>
			</tr> 
			<tr>
				<td>地址： </td>
				<td><div class="area_box"></div></td>
			</tr>
			<tr>
				<td>详细地址： </td>
				<td><input type="text" name="address" size="38" id="text" value="<?php echo $this->_tpl_vars['row']['address']; ?>
"/></td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td><input type="submit" name="submit" class="submit" value="保 存"/></td>
			</tr>  
		</table>
	</form> 
	</div>
	<div class="base_rit">
		<div class="sp_logo">
			<span>
				<?php if ($this->_tpl_vars['row']['logo'] == ''): ?>
					<img src="<?php echo $this->_tpl_vars['__PUBLIC__']; ?>
images/shop.png" id="back_img_url"/>
				<?php else: ?>
					<img src="<?php echo $this->_tpl_vars['__IMG__']; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['row']['logo'])) ? $this->_run_mod_handler('img_size', true, $_tmp, '120x120') : $this->_plugins['modifier']['img_size'][0][0]->img_size($_tmp, '120x120')); ?>
" id="back_img_url"/>
				<?php endif; ?>				
			</span>
			<div class="uploadimg">
				<a href="javascript:;" id="update_avatar" class="uploadfile">
					上传店标<input type="file" name="imgFile" id="imgFile"/>
				</a>
			</div>
		</div> 
		
	</div>
</div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index/footer.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<script type="text/javascript" src="<?php echo $this->_tpl_vars['__PUBLIC__']; ?>
js/ajaxfileupload.js"></script>
<script type="text/javascript" src="<?php echo $this->_tpl_vars['__PUBLIC__']; ?>
js/area.js"></script>
<script type="text/javascript">
$(function(){
	<?php if ($this->_tpl_vars['row']['prov'] == '' && $this->_tpl_vars['row']['city'] == '' && $this->_tpl_vars['row']['dist'] == ''): ?>
		$(".area_box").area();
	<?php else: ?>	
		$(".area_box").area({
			'prov':'<?php echo $this->_tpl_vars['row']['prov']; ?>
',
			'city':'<?php echo $this->_tpl_vars['row']['city']; ?>
',
			'dist':'<?php echo $this->_tpl_vars['row']['dist']; ?>
'
		});	
	<?php endif; ?> 
	$(document).on("change", "#update_avatar", function(){ 
		$("#upload_msg").ajaxStart(function(){ 
      		$(this).show(); 
   		}); 
		$.ajaxFileUpload({ 
		   	url:'?m=album&a=sp_logo', 
		   	secureuri:false,
		   	fileElementId:'imgFile', 
		   	dataType: 'text', 
		   	success: function(result){ 
				data = jQuery.parseJSON(result); 
				if(data.error == '0'){
					$(".sp_logo img").attr('src',data.url); 
				}else{ 
					alert(data.msg); 
				}
			}
		});
	});
	
}); 
</script>